const scrollTo = {
  bind(el, binding) {
    el.addEventListener("click", () => {
      const target = document.querySelector(binding.value);
      if (target) {
        target.scrollIntoView({ behavior: "smooth" });
      }
    });
  },
};
scrollTo.install = function (Vue) {
  Vue.directive("scrollTo", scrollTo);
};
export default scrollTo;
